import service from '@/utils/request'

const SafetyApi = {
  // ---------------安全设备----------------
  addSafety: function (data) {
    return service.post('safety', data)
  },
  deleteSafety: function (data) {
    return service.put('safety/delete', data)
  },
  editSafety: function (data) {
    return service.put('safety', data)
  },
  listSafety: function (data) {
    return service.get('equip/page', {params: data })
  },
  getSafetyInfo: function (data) {
    return service.get('safety', {params: data })
  },
  checkSafetyHeartbeatList:function(data){
    return service.get('safety/log/list', {params: data })
  },
  // 呼叫器绑定的安全设备
  listSafetyEquip:function(data){
    return service.get('equip/listSafetyEquip', {params: data })
  },
  // 解绑安全设备
  safetyBatchUnBinding:function(data){
    return service.put('equip/safetyBatchUnBinding', data)
  },
  // 绑定安全设备
  safetyBatchBinding:function(data){
    return service.put('equip/safetyBatchBinding', data)
  }
}

export default SafetyApi
